Passed
Pull Request — develop (#338)
by
unknown
05:25
created

html.js ➔ html   A

Complexity

Conditions 3

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 14
rs 9.85
c 0
b 0
f 0
cc 3
1
const fs = require('fs');
2
3
module.exports = function (gulp, plugins, config, env) {
4
  return function html() {
5
    return gulp.src(env.production() ? config.build + '/*.html' : 'html/*.html')
6
      .pipe(plugins.realFavicon.injectFaviconMarkups(JSON.parse(fs.readFileSync(config.faviconData)).favicon.html_code))
7
      .pipe(env.production(plugins.inlineSource({ compress: false })))
8
      .pipe(plugins.cacheBust({
9
        type: 'timestamp'
10
      }))
11
      .pipe(plugins.htmlmin({
12
        removeComments: true,
13
        collapseWhitespace: true,
14
        minifyJS: true
15
      }))
16
      .pipe(gulp.dest(config.build));
17
  };
18
};
19